<template>
	<view class="content">
		<u-navbar title=" " leftIcon=" " placeholder :bgColor="bgColor" :border="false">
			<view class="search-wrap" slot="center" @click="goSearch">
				<u-search placeholder="搜索笔记" bgColor="#ffffff" :showAction="false" inputAlign="center" searchIcon=" "
					disabled></u-search>
			</view>
		</u-navbar>
		<view class="h1">
			<view class="mr-15">我的知识库</view>
			<u-icon name="plus" color="#000" size="20" bold></u-icon>
		</view>
		<view class="scroll-wrap">
			<scroll-view class="scroll-view_H" scroll-x>
				<view class="knowledge-li " v-for="i in 10" :key="i" @click="goChooseQuestions">
					<view class="top">
						<text>知识库名称{{i+1}}</text>
						<text class="font-24">笔记数量： 100</text>
					</view>
					<view class="bottom shadow">

					</view>
				</view>
			</scroll-view>
		</view>
		<custom-tab-bar :currentIndex="0"></custom-tab-bar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgColor: "transparent",

			}
		},
		onLoad() {

		},
		methods: {
			goSearch() {
				uni.navigateTo({
					url: './searchList'
				})
			},
			goChooseQuestions() {
				uni.navigateTo({
					url: './chooseQuestions'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.search-wrap {
		width: 200px;
		height: 33px;
		border-radius: 20px;
		opacity: 1;
		background: #FCFCFC;
	}

	.h1 {
		display: flex;
		align-items: center;
		font-size: 42rpx;
		font-weight: 600;
		color: #000;
		margin: 40rpx 0 40rpx 24rpx;
	}

	.scroll-wrap {
		margin-left: 24rpx;
		max-width: 100vw;
		height: 340rpx;
		color: #3d3d3d;

		.scroll-view_H {
			white-space: nowrap;
			width: 100%;
			height: 340rpx;

			.knowledge-li {
				display: inline-block;
				width: 308rpx;
				height: 292rpx;
				margin-right: 10rpx;
				border-radius: 30rpx;


				.top {
					border-radius: 30rpx 30rpx 0px 0px;
					background: #F8F5F4;
					width: 100%;
					height: 86px;
					padding: 20rpx 30rpx;
					box-sizing: border-box;
					display: flex;
					flex-direction: column;
					justify-content: space-between;
				}

				.bottom {
					border-radius: 0px 0px 30rpx 30rpx;
					background: #ffffff;
					width: 100%;
					height: 73px;
				}
			}
		}
	}
</style>